<template>
  <view class="home flex column">
    <u-navbar :background="{ backgroundColor: '#3D5FFF' }" title="人员轨迹" back-icon-color="#fff" title-color="#fff">
    </u-navbar>
    <u-cell-item :title="info.name" :value="info.workType" :arrow="false"></u-cell-item>
    <scroll-view
      :scroll-y="true"
      class="steps-box"
    >
      <u-steps un-active-color="#333" mode="number" :list="numList" :current="-1" direction="column"></u-steps>
    </scroll-view>
  </view>
</template>

<script>
export default {
  data () {
    return {
      numList: [],
      info: {}
    }
  },
  onLoad (options) {
    this.info = JSON.parse(options.item)
    this.getData()
  },
  methods: {
    getData () {
      this.$post('/admin/ryHistoryCount/track/dataList', {
        customerNo: this.info.customerNo,
        peopleNo: this.info.peopleNo,
        inWellTime: this.info.time,
      }).then(res => {
        this.numList = res.body.map(item => {
          return {
            name: `${item.stationName}\n${item.inJzTime}`
          }
        })
      })
    }
  },
}
</script>
<style lang="scss" scoped>
.home {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
}
.steps-box {
  padding: 20rpx 100rpx;
  overflow: hidden;
}
</style>